package com.xmtlxx.tms.mapper;

import com.xmtlxx.common.annotation.DataColumn;
import com.xmtlxx.common.annotation.DataPermission;
import com.xmtlxx.common.core.mapper.BaseMapperPlus;
import com.xmtlxx.tms.domain.LinePoi;
import com.xmtlxx.tms.domain.bo.LinePoiBo;
import com.xmtlxx.tms.domain.vo.LinePoiVo;
import com.baomidou.mybatisplus.extension.plugins.pagination.Page;
import org.apache.ibatis.annotations.Param;

import java.util.List;

/**
 * 线路途经点Mapper接口
 *
 * @author xmtlxx
 * @date 2022-08-15
 */
public interface LinePoiMapper extends BaseMapperPlus<LinePoiMapper, LinePoi, LinePoiVo> {
    /**
     * 根据条件分页查询线路途经点
     *
     * @param linePoi 线路途经点
     * @return Page LinePoi
     */
    @DataPermission({
        @DataColumn(key = "tenantName", value = "l.create_by"),
        @DataColumn(key = "deptName", value = "l.dept_id"),
        @DataColumn(key = "userName", value = "l.create_by")
    })
    Page<LinePoiVo> selectPageLinePoiList(@Param("page") Page<LinePoi> page,@Param("linePoi") LinePoiBo linePoi);

    /**
     * 查询线路途经点列表
     *
     * @param linePoi 线路途经点
     * @return 线路途经点集合
     */
    @DataPermission({
        @DataColumn(key = "tenantName", value = "l.create_by"),
        @DataColumn(key = "deptName", value = "l.dept_id"),
        @DataColumn(key = "userName", value = "l.create_by")
    })
    List<LinePoiVo> selectLinePoiList(@Param("linePoi") LinePoiBo linePoi);

    LinePoiVo selectLinePoiVoByID(String id);
}
